home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
tests
/
iclient.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
1KB
|
67 lines
#include <iostream.h>
#include <stdio.h>
#include <osfcn.h>
#include <libc.h>
#include "RJS/Transport.h"
#include "RJS/NDR.h"
#include "RJS/KernelVar.h"
#include "Date.h"
#include "XKernelVar.h"
int main(int argc, char *argv[])
{
if (argc!=3) { cerr << "usage: " << argv[0] << " server port" << endl;exit(1); }
InetStream server;
server.socket_client(InetAddress(argv[1],atoi(argv[2])));
char buffer[1024];
NDR_receive ndr;
ndr.init(buffer,1024);
server >> ndr;
cout << ndr;
Date bd;
char m1[32];
char m2[32];
char test2[5];
int count;
char c;
short s;
unsigned short us;
int i;
float f;
double d;
Xkern_loadav load;
double d1[3];
cout << "Decoding..." << endl;
ndr >> c >> s >> i >> us >> m1 >> bd >> m2 >> f >> d >> load;
ndr.extract(test2,count);
cout << "c = " << c << endl;
cout << "s = " << s << endl;
cout << "i = " << i << endl;
cout << "us = " << us << endl;
cout << "m1 = " << m1 << endl;
cout << "bd = " << bd << endl;
cout << "m2 = " << m2 << endl;
cout << "f = " << f << endl;
cout << "d = " << d << endl;
cout << "d1 = " << d1[0] << " " << d1[1] << " " << d1[2] << " " << endl;
cout << "load = " << load << endl;
cout << "test2 = " << test2[0] << test2[1] << test2[2] << test2[3] << test2[4] << endl;
cout << "count = " << count << endl;
exit(0);
}